const arr = [1, 2, 3, 4, 56]
const obj = [{ a: 1 }, { b: 2 }]
const result = arr.map(item => item + 1)
console.log(result, 'result')
console.log(arr, 'arr')
arr.map(item => {
    item = item + 1
})
// console.log(result1, 'result1')
console.log(arr, 'arr1')
// const result2 = obj.map(item => {
//     item.test = 'ccc'
// })
console.log(obj, 'obj')
const result2 = obj.map(item => item.m = 123)
console.log(obj, 'obj')
console.log(result2, 'result2')
const a = arr.map(item=>{
    item=8
    // return item
})
console.log(arr,'arr')
console.log(a,'a')
const length = arr.length
// for(let i=0;i<length;i++){
//     if(i>3) return
//     console.log(i,'i')
// }
for(let i of arr){
    if(i>3) break
    console.log(i,'ii')
}
var i=0
while(i<length){
    // if(arr[i]>3) return
    console.log(arr[i],'arr[i]')
    i++
}